{% extends 'master/base.html' %}

{% block htmlhead %}
{% load html_tools %}
{{ 'manage/list.css' | as_css }}
{{ 'manage/account.css' | as_css }}
{{ 'admin/account.js' | as_js }}
{% endblock %}

{% block content %}
<div class="list_title">
    <span style="width:20%">邮箱</span>
    <span style="width:15%">姓名</span>
    <span style="width:15%">昵称</span>
    <span style="width:15%">学院</span>
    <span style="width:15%">状态</span>
    <span style="width:15%">操作</span>
</div>
<div class="message_container">
{% load account_custom %}
{% for stu in page %}
    <li>
        <a href="/manage/account/{{stu.id}}">
            <span style="width:20%">{{ stu.user.email }}</span>
            <span style="width:15%">{{ stu.true_name | default:'暂无'}}</span>
            <span style="width:15%">{{ stu.screen_name }}</span>
            <span style="width:15%">{{ stu | get_college_name }}</span>
            <span style="width:15%">{{ stu | get_student_status }}</span>
        </a>
        <a href="javascript:void(0)" onclick="$S.Account.remove({{stu.id}})" class="control">删除</a>
        <span>|</span>
        <a href="javascript:void(0)" onclick="$S.Account.ban({{stu.id}})" class="control">
        {% if stu.user.is_active %}
            禁用
        {% else %}
            恢复
        {% endif %}
        </a>
    </li>
    <div class="line_list"></div>
{% endfor %}
</div>
    {% include 'plugin/paginator.html' with page=page %}
{% endblock %}